<!--<div class="content-section introduction ">-->
  <!--<div>-->
    <!--<span class="feature-title">巡检管理<span class="gt">&gt;</span>巡检周期管理  </span>-->
  <!--</div>-->
<!--</div>-->
<div class="content-section implementation GridDemo clearfixes">
  <div class="mysearch">
    <div class="ui-g">
      <div class=" ui-g-4 ">
        巡检周期名：
        <input pInputText type="text" placeholder="请输入周期名" [(ngModel)]="queryModel.condition.name"/>
        <button pButton type="button"  label="查询"  (click)="suggestInsepections()" ></button>
      </div>
      <div class=" ui-g-2 ui-g-offset-6 option">
        <button pButton type="button"  label="新增"  (click)="showInspectionMask()" ></button>
        <button pButton type="button"  label="删除"  (click)="deleteInspection()" [disabled]="!selectInsepections||selectInsepections.length===0"></button>
      </div>
    </div>
  </div>
  <div class="ui-g">
    <div class="ui-g-12">
      <p-dataTable [value]="inspections"
                   [totalRecords]="totalRecords"  [(selection)]="selectInsepections">
        <p-column [style]="{'width':'38px'}" selectionMode="multiple"></p-column>
        <p-column  *ngFor="let col of cols" field="{{col.field}}" header="{{col.header}}"></p-column>
        <p-column header="操作">
          <ng-template let-car="rowData" pTemplate="body" let-i="rowIndex">
            <button pButton type="button" label="修改" (click)="updateOption(inspections[i])"></button>
            <button pButton type="button" label="查看班次" (click)="showOption(inspections[i])"></button>
            <button pButton type="button" label="编辑班次" (click)="showEditMask(inspections[i])"></button>
          </ng-template>
        </p-column>
        <ng-template pTemplate="emptymessage">
          当前没有数据
        </ng-template>
      </p-dataTable>
      <p-paginator rows="10" [totalRecords]="totalRecords" [rowsPerPageOptions]="[10,20,30]" (onPageChange)="paginate($event)"></p-paginator>
    </div>
  </div>
</div>
<!--添加周期model-->
<app-add-or-update-inspection
  *ngIf="showAddMask"
  (closeAddMask)="closeInspectionMask($event)"
  [currentInspection]="currentInpection"
  [state]="state"
  (addDev)="addInsepection($event)"
  (updateDev)="updateInspection($event)">
</app-add-or-update-inspection>
<!--编辑班次-->
<app-edit-shift
  [currentInspection]="currentInpection"
  (closeEditMask)="closeInspectionEditMask($event)"
  [shiftState]="shiftState"
  (addDev)="addTimeCycle($event)"
  *ngIf="editMask">
</app-edit-shift>
